home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20000114-20000217 / 000021_news@columbia.edu _Sun Jan 16 18:55:43 2000.msg < prev    next >
Internet Message Format  |  2020-01-01  |  8KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id SAA23280
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Sun, 16 Jan 2000 18:55:43 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id SAA02568
  7.     for kermit.misc@watsun.cc.columbia.edu; Sun, 16 Jan 2000 18:40:09 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Case Study #9: Printing
  11. Date: 16 Jan 2000 23:40:08 GMT
  12. Organization: Columbia University
  13. Message-ID: <85tkso$2g6$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@columbia.edu
  15.  
  16.  
  17. C-Kermit 7.0 offers many ways to print, some of which are new.  This
  18. discussion focuses on the Unix version of C-Kermit but to some extent also
  19. applies to Kermit 95 and MS-DOS Kermit.
  20.  
  21. Each kind of printing uses the SET PRINTER value as the destination for
  22. material to be printed.  You can see the current SET PRINTER value with SHOW
  23. PRINTER.  The default PRINTER value is "(default)", which means to use the
  24. default system printer.  The Unix version of C-Kermit lets you select
  25. different SET PRINTER values, which can be:
  26.  
  27.  1. A filename, to redirect all printer output to the specified file.
  28.     Each print operation appends to the given file (or creates it if it
  29.     doesn't exist).
  30.  
  31.  2. A pipeline; that is, a pipe symbol followed by one or more commands,
  32.     which are to receive the material to be printed as standard input;
  33.     for example "set printer {| lpr -PLaserJet5L}".  Of course the command
  34.     need not be "lpr"; it can be anything at all.
  35.  
  36. Printing methods are as follows:
  37.  
  38.  1. The PRINT command, which lets you print a local file.  You can
  39.     include printer options after the filename; for example in Unix
  40.     (when using "lpr"): "print oofa.txt -#3" to print 3 copies of the
  41.     oofa.txt file.
  42.  
  43.  2. SET DESTINATION PRINTER.  This tells C-Kermit to send any files that
  44.     are received using Kermit protocol to the SET PRINTER device, rather
  45.     than storing them on disk.  (Other destinations include DISK, SCREEN,
  46.     and NOWHERE.)
  47.  
  48.  3. The SEND /PRINT command tells C-Kermit to send a file to the Kermit
  49.     program on the other computer and have it printed there (RPRINT and
  50.     REMOTE PRINT are synonyms for SEND /PRINT).
  51.  
  52.  4. The -G command-line option, new to C-Kermit 7.0, is like -g (GET) but
  53.     sends the incoming file to standard output so it can be piped into
  54.     a command such as "lpr".
  55.  
  56.  5. Transparent printing, new to C-Kermit 7.0, operates when C-Kermit is
  57.     in CONNECT mode.
  58.  
  59. Transparent printing is initiated by the host when it sends the escape
  60. sequence <ESC>[5i to the terminal (when C-Kermit is in CONNECT mode,
  61. C-Kermit is the "terminal").  All subsequent material goes to the printer
  62. (rather than the screen) until the escape sequence <ESC>[4i arrives, which
  63. means to stop printing.
  64.  
  65. C-Kermit 7.0 does transparent printing only if you tell it to SET TERMINAL
  66. PRINT ON.  By default, TERMINAL PRINT is OFF for compatibility with previous
  67. releases and also because you might be accessing Unix from a real terminal
  68. or a terminal emulator that you want to handle the transparent printing.
  69. The SHOW TERMINAL command tells you whether PRINT is ON or OFF.
  70.  
  71. Unlike the Kermit-protocol based methods, transparent printing is NOT
  72. error-checked; this can make a difference on serial connections that are
  73. noisy or not well flow-controlled.  Also, transparent-print material is not
  74. converted in any way.  When using the Kermit protocol methods, on the other
  75. hand, you get error-free data transfers in your choice of text or binary
  76. mode and, with text transfers, your choice of character-set translations.
  77. For details about transparent printing, see Section 3.3 of ckermit2.txt.
  78.  
  79. Now let's try to make some sense of this jumble.  When you are using Kermit,
  80. you are usually using two computers at once: one (let's call it A) where you
  81. have used to Kermit to make a connection to the second one (call it B).
  82. Either Computer A or Computer B (or both) can have a printer that you want
  83. to use.  Considering these two computers:
  84.  
  85.  1. You can print a Computer A file on Computer A's printer.
  86.  2. You can print a Computer A file on Computer B's printer.
  87.  3. You can print a Computer B file on Computer A's printer.
  88.  4. You can print a Computer B file on Computer B's printer.
  89.  
  90. Here is a summary of some (not necessarily all) ways to do each with Kermit:
  91.  
  92.  1. To print a local file from the Kermit prompt on Computer A:
  93.  
  94.     . You can use Kermit's PRINT command.
  95.  
  96.     . Use a "shell escape" command like "!lpr -P oofa.txt"
  97.  
  98.     . In some cases you can also use the COPY command; e.g. in
  99.       Kermit 95, where the printer is accessed as a device rather
  100.       than as a command.
  101.  
  102.  2. To send a (local) file from Computer A to be printed on Computer B:
  103.  
  104.     . You can transfer it with Kermit in the traditional manner and
  105.       then give the appropriate command to Computer B to print it.
  106.  
  107.     . You can use SEND /PRINT (RPRINT, REMOTE PRINT) to transfer the 
  108.       file to Computer B's Kermit program, which should send it directly
  109.       to Computer B's printer.
  110.  
  111.     . If Computer B has C-Kermit 7.0, you can use:
  112.  
  113.         kermit -G <filename> | lpr
  114.  
  115.       on Computer B.  This triggers an "autoupload" from Computer A
  116.       and the result is sent to Computer B's printer by piping it to
  117.       Computer B's lpr command.
  118.        
  119.     . A Kerbang Script can be used on Computer B:
  120.  
  121.         #!/usr/local/bin/kermit +
  122.         set destination printer
  123.         get {\%1}
  124.         exit \v(status)
  125.  
  126.  3. To print a Computer B (remote) file on Computer A's (local) printer:
  127.  
  128.     . You can transfer it with Kermit in the traditional manner and
  129.       then give the appropriate command to Computer A to print it.
  130.  
  131.     . You can tell Computer A's Kermit to SET DESTINATION PRINTER and
  132.       then send the file with Kermit from Computer B to Computer A.
  133.  
  134.     . You can start Kermit on Computer B and give it a SEND /PRINT
  135.       (RPRINT, REMOTE PRINT) command.  This should trigger an autodownload
  136.       to Computer A's Kermit program, which should send the file directly
  137.       to its local printer.
  138.  
  139.     . While Kermit on Computer A is in CONNECT mode, use a transparent
  140.       printing command like "pcprint" on Computer B.  Remember, C-Kermit
  141.       must first have this feature enabled with SET TERMINAL PRINT ON.
  142.  
  143.  4. To use Computer A to cause a Computer B file to be printed on Computer B:
  144.  
  145.     . With Computer A's Kermit in CONNECT mode, just give the appropriate
  146.       printing command at Computer B's prompt.
  147.  
  148.     . With Computer B's Kermit program at its prompt, give it a PRINT
  149.       command for the desired file.
  150.  
  151.     . With Computer B's Kermit in server mode, and Computer A's Kermit at
  152.       its prompt, give the command "remost host <printcommand> <filename>",
  153.       where <printcommand> is the command used for printing on Computer B,
  154.       and <filename> is the name of the file on Computer B to be printed.
  155.  
  156. For symmetry Kermit should also have a GET /PRINT print command; this will
  157. be added in a future release.  For now use SET DESTINATION PRINTER, GET, and
  158. then SET DESTINATION DISK to restore the default destination in case you
  159. will be transferring more files.
  160.  
  161. - Frank